import React from 'react';
import Image from '@components/image';

export default (props) => {
  function fClick(e) {
    e.stopPropagation();
    const {onClick} = props;
    if (typeof onClick === 'function') {
      onClick();
    }
  }
  return (
    <div className='box' onClick={fClick}>
      <div className='pic'>
        <Image src={props.src} width={200} previewWidth={30} />
      </div>
    </div>
  )
};